package referential;

public class Position {
  private double coordX;
  private double coordY;
  
  public Position(double coordX, double coordY) {
    super();
    this.coordX = coordX;
    this.coordY = coordY;
  }
  
  public double getCoordX() {
    return coordX;
  }

  public double getCoordY() {
    return coordY;
  }

  public double getDistance(Position autrePosition) {
    double distance = Math.sqrt( Math.pow((autrePosition.getCoordX() - this.getCoordX()), 2) + Math.pow((autrePosition.getCoordY() - this.getCoordY()), 2) );
    return distance;
  }
  
}
